package com.itheima.jdbcTemplate;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * ClassName:JdbcTemplateDemo
 * Package:com.itheima.jdbcTemplate
 * Description:jdbc的最基本用法
 * Date:2020/2/25 23:18
 * User: snow
 */
public class JdbcTemplateDemo2 {
	public static void main(String[] args) {
		//1、获取容器
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
		//2、创建对象
		JdbcTemplate jdbcTemplate = applicationContext.getBean("jdbcTemplate",JdbcTemplate.class);
		//3、执行操作
		jdbcTemplate.execute("insert into account(name ,money) values ('order',1000)");

	}
}
